# -*- coding: utf-8 -*-
# @Time    : 2024/1/14 20:19
# @Author  : micah
# @File    : 22.贪婪模式与非贪婪模式.py
# @Software: PyCharm


import re


html_document = '<html><head><title>Title</title>'

for temp in re.findall(r'<.*>', html_document):
    print(temp)

for temp in re.findall(r'<.*?>', html_document):  # ?尽可能少的匹配
    print(temp)
